package com.xiangge.zuoye2;

import java.util.Scanner;

public class Demo6 {
    public static void main(String[] args) {
        int[] arr = {12,14,23,45,66,68,70,77,90,91};
        int[] brr = new int[arr.length+1];

        System.out.println("请输入一个整数：");
        int a = new Scanner(System.in).nextInt();
        brr[0]=a;
        for (int i = 1; i < brr.length; i++) {
            brr[i]=arr[i-1];
        }


        for (int i = 0; i < brr.length - 1; i++) {
            for (int j = 0; j < brr.length - 1; j++) {
                if (brr[i] < brr[j]) {
                    int temp = brr[i];
                    brr[i] = brr[j];
                    brr[j] = temp;
                }
            }
        }

        System.out.print("生成的新数组：");
        for (int i = 0; i < brr.length; i++) {
            System.out.print(brr[i]+" ");
        }

    }
}
